<!--<?php
require_once template('header'); 
print <<<EOT
<!--右边开始-->
<script type="text/javascript">
$(function(){			
$(".addimg").click(function(e){
$(this).parent("p").after($(".g_img:last").clone(true)); 
});
$(".delimg").click(function(e){
	if($('#gallery p').length>1) $(this).parent("p").remove(); 
});
});
</script>
<div id="right" style="width:100%; overflow: hidden;">
<!--
EOT;
foreach ($photo as $val){
print <<<EOT
-->
	<div id="r$val[uid]" class="promotion">
		<p><a href="javascript:;" onclick="remove('$val[uid]','$val[del]');">[-]</a></p>
		<p><a href="$val[img]" target="_blank"><img src="$val[img]" width="125" height="46" /></a></p>
		<p>标题：<input type="text"  value="$val[title]" size="16" name="title$val[uid]" id="title$val[uid]" onkeyup="$('#temp').load('admincp.php?module=$module&action=edit&uid=$val[uid]&title='+\$('#title$val[uid]').val())"; class="text" /></p>
		<p>链接：<input type="text"  value="$val[link]" size="16" name="link$val[uid]" id="link$val[uid]" onkeyup="$('#temp').load('admincp.php?module=$module&action=edit&uid=$val[uid]&link='+\$('#link$val[uid]').val())"; class="text" /></p>
	</div>
<!--
EOT;
} print <<<EOT
-->
	<form name="mvmmall" action="" method="post" enctype="multipart/form-data">
	<input type="hidden" name="setp" ipd="setp" value="1">
	<table cellpadding="0" cellspacing="1" class="list1" style="margin-top:10px;">
		<tr><th>上传推广图片样式</th></tr>
		<tr>
			<td width="100%">
			<div id="gallery"><p class="g_img"><a href="javascript:;" class='addimg'>[+]</a>
			标题 <input type="text" name="title[]" size="15" class="text" />&nbsp; &nbsp;
			链接 <input type="text" name="link[]" size="15" class="text">&nbsp; &nbsp;
			图片<input type="file" name="gallery[]" size="15" class="text">
			<a href="javascript:;" class="delimg">[-]</a></p></div></td>
		</tr>
	</table>
	<div id="tfoot">
	  	<input type="submit" name="Submit" value="&nbsp;$lang[submit]&nbsp;" onclick="" />
	 	<input type="reset" name="reset" value="&nbsp;$lang[reset]&nbsp;" />
	</div>
	</form>
</div>
<!--
EOT;
?>-->